import request from "@/utils/request";

export function listLoanApplication(params) {
  return request({
    url: "/loan-application",
    method: "get",
    params,
  });
}

export function listPageLoanApplication(params) {
  return request({
    url: "/loan-application/page",
    method: "get",
    params,
  });
}

export function saveLoanApplication(params) {
  return request({
    url: "/loan-application",
    method: "post",
    data: params,
  });
}

export function updateLoanApplication(id,params) {
  return request({
    url: `/loan-application/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteLoanApplication(id) {
  return request({
    url: `/loan-application/${id}`,
    method: "delete",
  });
}

export function deleteBatchLoanApplication(idList) {
  return request({
    url: `/loan-application/batch`,
    method: "delete",
    data: idList,
  });
}

export function getLoanApplicationById(id) {
  return request({
    url: `/loan-application/${id}`,
    method: "get",
  });
}
